package com.usian.scheduled;

import com.usian.controller.UserController;
import com.usian.service.UserService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

public class Myjob implements Job {


    @Autowired
    private UserService userService;


    private final static Logger logger = LoggerFactory.getLogger(UserController.class);


    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

      userService.testCorn();
       logger.info("定时任务的执行内容=="+new Date());
    }
}
